package edu.zzu.mapper;

import edu.zzu.Entity.Region;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface RegionMapper extends Mapper<Region> {

    @Select("select regionCode from Region where prv like concat('%',#{prv},'%') and stage=1")
    String selectRegionCodeByPrv(String prv);

    @Select("select regionCode from Region where cty like concat('%',#{cty},'%') and stage=2")
    String selectRegionCodeByCty(String cty);

    @Select("select regionCode from Region where twn like concat('%',#{twn},'%') and stage=3")
    String selectRegionCodeByTwn(String twn);
}
